class Flag < ActiveRecord::Base
	def self.open
		flag = first
		flag.status = 1
		flag.day += 1
		flag.save!
	end
	def self.close
		flag = first
		flag.status = 0
		flag.save!
	end
	def self.day
		flag = first
		return flag.day
	end
	def self.open?
		return first.status
	end
end
